# 导入所需的库
import numpy as np
import matplotlib.pyplot as plt

# 创建数据
x = np.linspace(0, 10, 100)
y1 = np.sin(x)
y2 = np.cos(x)

# 创建填充区域图
plt.fill_between(x, y1, color='blue', alpha=0.5)  # 蓝色填充区
plt.fill_between(x, 0, y2, where=y2 > y1, facecolor='red', alpha=0.5)  # 红色填充区，仅当y2大于y1时

# 添加标题和标签
plt.title('Area Chart Example')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')

# 显示图形12
plt.show()